﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JMT.Controls.Elements;

namespace JMT.Controls
{
    public static class JBoxFactory
    {
        public static IJBox Create(JMT.Data.JModel jModel, JMT.Data.JElement jElement)
        {
            IJBox jBox = null;
            if (jModel is JMT.Data.JClass)
            {
                JMT.Data.JClass jClass = jModel as JMT.Data.JClass;
                jBox = new Elements.ClassPanel(jClass, jElement);
            }
            else if (jModel is JMT.Data.JInterface)
            {
                JMT.Data.JInterface jInterface = jModel as JMT.Data.JInterface;
                jBox = new Elements.InterfaceBox(jInterface, jElement);
            }
            return jBox;
        }
    }
}
